from django.conf.urls import url
from rest_framework.urlpatterns import format_suffix_patterns

from blockchainrestful import views

urlpatterns = [
    # for turing money
    url(r'^version/$', views.get_version),
    url(r'^key_pair/$', views.get_key_pair),
    url(r'^accounts/(?P<key>[0-9a-zA-Z]+)/balance$', views.get_balance),
    url(r'^accounts/(?P<key>[0-9a-zA-Z]+)/transdetail$', views.get_transdetail),
    url(r'^accounts/(?P<key>[0-9a-zA-Z]+)/depositdetail$', views.get_depositdetail),
    url(r'^accounts/(?P<key>[0-9a-zA-Z]+)/payeeinfo$', views.get_payeeinfo),
    url(r'^transaction/(?P<key>[0-9a-zA-Z]+)$', views.create_transaction),
    url(r'^transaction/fulfillment/(?P<key>[0-9a-zA-Z]+)$', views.sign_fulfillment),
    url(r'^statement$', views.get_transactions_bypubkeys),
    url(r'^alltran$', views.get_alltransactions),
    url(r'^transtatus$', views.get_transtatus),
    # for turing bill
    url(r'^transaction/(?P<key>[0-9a-zA-Z]+)/bill/detail$', views.get_bill_detail),
    url(r'^accounts/(?P<key>[0-9a-zA-Z]+)/bill/list$', views.get_bill_list),
    url(r'^accounts/(?P<key>[0-9a-zA-Z]+)/bill/transdetail$', views.get_bill_transdetail),
    url(r'^transaction/(?P<key>[0-9a-zA-Z]+)/bill$', views.create_bill_trans),
    url(r'^accounts/(?P<key>[0-9a-zA-Z]+)/bill/depositlist$', views.get_bill_depositlist),
    url(r'^accounts/(?P<key>[0-9a-zA-Z]+)/bill/payhistory$', views.get_bill_payhistory),
    url(r'^accounts/(?P<key>[0-9a-zA-Z]+)/bill/billtreeinfo$', views.get_bill_billtreeinfo),
    url(r'^billtrans$', views.get_bill_billtrans),

]

urlpatterns = format_suffix_patterns(urlpatterns)


























